package myapp.CTL;

import java.util.ArrayList;

import myapp.DAO.ServiceDAO;
import myapp.DTO.ServiceDTO;

public class ServiceCTL {
	private ServiceDAO data;
	
	public ServiceCTL(){
		data = new ServiceDAO();
	}
	
	public ArrayList<ServiceDTO> getAllServices(){
		return data.getAllServices();
	}
	
	public ArrayList<ServiceDTO> getServicesByKeyWord(String keyword){
		return data.getServicesByKeyWord(keyword);
	}
	
	public ArrayList<ServiceDTO> getServicesInDistance(double yourLat, double yourLong, double distance){
		return data.getServicesInDistance(yourLat, yourLong, distance);
	}
	
	public void AddNewService(ServiceDTO service){
		data.AddNewService(service);
	}
}
